<?php

declare(strict_types=1);

namespace app\model;

use think\model\concern\SoftDelete;
use app\model\common\BaseModel;
use app\model\common\HasPswdTrait;
use app\model\common\LoginCacheTrait;

/**
 * 商品类型
 */
class GoodsType extends BaseModel
{
    public static $modelAlias = '商品类型';

    protected $table = 'goods_type';
    protected $pk = 'id';

    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    protected $json = [];
    protected $jsonAssoc = true;

    protected $hidden = [];
    

    public function __construct(array $data = [])
    {
        parent::__construct($data);
    }

    /** 写入后事件 */
    public static function onAfterWrite($model)
    {
        // 更新数据到缓存中
    }

}
